﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using BOSS.Domain.Customers;

namespace BOSS.Service.Customers
{
    public interface ICustomerService : IEntityService<Customer, int>, ISerialNumberGeneratable
    {
        /// <summary>
        /// 保存客户账户
        /// </summary>
        /// <param name="customerAccount"></param>
        /// <returns></returns>
        int SaveCustomerAccount(CustomerAccount customerAccount);

        /// <summary>
        /// 获取客户账户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        CustomerAccount FindCustomerAccountById(int id);

        /// <summary>
        /// 获取会员卡
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        CustomerCard FindCustomerCardById(int id);

        /// <summary>
        /// 获取会员卡
        /// </summary>
        /// <param name="cardNumber"></param>
        /// <returns></returns>
        CustomerCard FindCustomerCardByCardNumber(string cardNumber);

        /// <summary>
        /// 保存或修改会员卡
        /// </summary>
        /// <param name="customerCard"></param>
        void SaveOrUpdateCustomerCard(CustomerCard customerCard);

        /// <summary>
        /// 会员卡流程
        /// </summary>
        /// <param name="customerCard"></param>
        /// <param name="action"></param>
        void CustomerCardWorkflow(CustomerCard customerCard, CustomerCardFlowAction action);
    }
}
